import http from '@/utils/http.js';

export default {
	// 数据列表
	sysCategoryListApi: data => {
		return http.post('/sysCategory/list', data);
	},
	// 添加数据
	sysCategoryInsertApi: data => {
		return http.post('/sysCategory/insert', data);
	},
	// 更新数据
	sysCategoryUpdateApi: data => {
		return http.post('/sysCategory/update', data);
	},
	// 通过id获取详情
	sysCategoryDetailApi: params => {
		return http.get('/sysCategory/detail', { params });
	},
	// 通过id批量删除数据
	sysCategoryDeleteByIdApi: data => {
		return http.post('/sysCategory/deleteById', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } });
	},
	// 通过名称批量添加数据
	sysBashInsertByNamesApi: data => {
		return http.post('/sysCategory/bashInsertByNames', data);
	},
};
